//
//  HBPlaceHoldTextView.swift
//  sinaWeibo
//
//  Created by Beans on 16/6/30.
//  Copyright © 2016年 iceWorks. All rights reserved.
//

import UIKit

class HBPlaceHoldTextView: UITextView {

    var placeHolderStr: NSString?

    // Only override drawRect: if you perform custom drawing.
    // An empty implementation adversely affects performance during animation.
    override func drawRect(rect: CGRect) {
        // Drawing code

        // 设置占位文字大小, 使之与textView的font一样大
        placeHolderStr?.drawAtPoint(CGPointMake(5, 8), withAttributes: [NSFontAttributeName : font!])
        // 注意: font必须有值
    }

}
